<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>京东导航栏</title>
    <link rel="stylesheet" href="./css/reset.css">
    <link rel="stylesheet" href="./font/iconfont.css">

    <style>
        .clearfix::before,.clearfix::after{
            content: '';
            display: table;
            clear: both;
        }
        a,span{
            text-decoration: none;
            font: 12px/1.5 Microsoft YaHei,Heiti SC,tahoma,arial,Hiragino Sans GB,"\5B8B\4F53",sans-serif;
            color: #999;
        }
        a{
            display: inline-block;
        }
        a:hover{
            color: #f10215;
        }
        i.icon-jiantouarrow483{
            font-size: 12px;
            color: #999;

        }
        
        .line{
            width: 1px;
            height: 10px;
            background: #999;
            margin: 11px 11px;
        }

        .nav-wrapper{
            background-color: #e3e4e5;
            border-bottom: 1px solid #ddd;
            line-height: 30px;
        }

        .nav-content{
            width: 1190px;
            margin: 0 auto;
             line-height: 30px;
        }
        .location{
            float: left;
            position: relative;
        }

        .nav-content ul{
             float: right;
        }

        .nav-content ul li{
            float: left;
        }

         span.icon-zb{
             color: #f10215;
             margin-left: 4px;
         }

         .current-city{
             padding-right: 13px;
             /* 要先将框线设置上不然当移入的时候添加框线会让布局闪烁
               预设的时候可以将颜色设置为透明
             */
             border: 1px solid transparent;      
             z-index: 99;
         }
         .city-list{
             display: none;
             width: 300px;
             height: 400px;
             background-color: #fff;
             box-shadow: 0 0 13px rgba(219, 209, 209, 0.3);
             position:absolute;
             top:32px; 
             border: 1px solid #ccc;
             border-top-color: #fff;
         }
         .location:hover .city-list{
             display: block
         }
         .location:hover  .current-city{
             background-color: #fff;
             border: 1px solid #ccc;
             border-bottom: 1px solid #fff;
         }

         .location:hover a{
             color:#f10215 ;
         }
    </style>
</head>

<body>
    <div class="nav-wrapper">
        <div class="nav-content clearfix">
            <div class="location">
                <div class="current-city">
                    <span class="iconfont icon-zb"></span>
                <a href="#">北京</a>
                <div class="city-list"></div>
                </div>
            </div>

            <ul>
                <li>
                    <a href="#">你好，请登录</a>
                    <a href="#">免费注册</a>
                </li>
                <li class="line"></li>
                <li>
                    <a href="#">我的订单</a>
                </li>
                <li class="line"></li>
                <li>
                    <a href="#">我的京东</a>
                    <i class=" iconfont icon-jiantouarrow483"></i>
                </li>
                <li class="line"></li>
                <li>
                    <a href="#">京东会员</a>
                </li>
                <li class="line"></li>
                <li>
                    <a href="#">企业采购</a>
                    <i class=" iconfont icon-jiantouarrow483"></i>
                </li>
                <li class="line"></li>
                <li>
                    <span>客户服务</span>
                    <i class=" iconfont icon-jiantouarrow483"></i>
                </li>
                <li class="line"></li>
                <li>
                    <span>网站导航</span>
                    <i class=" iconfont icon-jiantouarrow483"></i>
                </li>
                <li class="line"></li>
                <li><span>手机京东</span></li>
            </ul>
        </div>
    </div>
</body>

</html>